﻿CREATE PROCEDURE [dbo].[proc_Orders_GetList_Count]
(
		@CompanyId int,
		@SText nvarchar(50)
	)
AS
Begin
	Select Count(Id) From Orders
	Where (@CompanyId=0 Or CompanyId=@CompanyId) And IsReason=0 And (@SText is null Or CustomerName like '%'+ @SText +'%' Or EName like '%'+ @SText +'%'  Or BaiDuAccount like '%'+ @SText +'%') and Orders.FinanceFlag=0 
End
	RETURN